go示例

<p>
	<em>Go by Example</em> is a hands-on introduction
	to Go using annotated example programs. Check out
	the <a href="/gobyexample/hello-world">first example</a> or
	browse the full list below.
</p>

<ul>

	<li><a href="/gobyexample/hello-world">Hello World</a></li>

	<li><a href="/gobyexample/values">Values</a></li>

	<li><a href="/gobyexample/variables">Variables</a></li>

	<li><a href="/gobyexample/constants">Constants</a></li>

	<li><a href="/gobyexample/for">For</a></li>

	<li><a href="/gobyexample/if-else">If/Else</a></li>

	<li><a href="/gobyexample/switch">Switch</a></li>

	<li><a href="/gobyexample/arrays">Arrays</a></li>

	<li><a href="/gobyexample/slices">Slices</a></li>

	<li><a href="/gobyexample/maps">Maps</a></li>

	<li><a href="/gobyexample/range">Range</a></li>

	<li><a href="/gobyexample/functions">Functions</a></li>

	<li><a href="/gobyexample/multiple-return-values">Multiple Return Values</a></li>

	<li><a href="/gobyexample/variadic-functions">Variadic Functions</a></li>

	<li><a href="/gobyexample/closures">Closures</a></li>

	<li><a href="/gobyexample/recursion">Recursion</a></li>

	<li><a href="/gobyexample/pointers">Pointers</a></li>

	<li><a href="/gobyexample/structs">Structs</a></li>

	<li><a href="/gobyexample/methods">Methods</a></li>

	<li><a href="/gobyexample/interfaces">Interfaces</a></li>

	<li><a href="/gobyexample/errors">Errors</a></li>

	<li><a href="/gobyexample/goroutines">Goroutines</a></li>

	<li><a href="/gobyexample/channels">Channels</a></li>

	<li><a href="/gobyexample/channel-buffering">Channel Buffering</a></li>

	<li><a href="/gobyexample/channel-synchronization">Channel Synchronization</a></li>

	<li><a href="/gobyexample/channel-directions">Channel Directions</a></li>

	<li><a href="/gobyexample/select">Select</a></li>

	<li><a href="/gobyexample/timeouts">Timeouts</a></li>

	<li><a href="/gobyexample/non-blocking-channel-operations">Non-Blocking Channel Operations</a></li>

	<li><a href="/gobyexample/closing-channels">Closing Channels</a></li>

	<li><a href="/gobyexample/range-over-channels">Range over Channels</a></li>

	<li><a href="/gobyexample/timers">Timers</a></li>

	<li><a href="/gobyexample/tickers">Tickers</a></li>

	<li><a href="/gobyexample/worker-pools">Worker Pools</a></li>

	<li><a href="/gobyexample/rate-limiting">Rate Limiting</a></li>

	<li><a href="/gobyexample/atomic-counters">Atomic Counters</a></li>

	<li><a href="/gobyexample/mutexes">Mutexes</a></li>

	<li><a href="/gobyexample/stateful-goroutines">Stateful Goroutines</a></li>

	<li><a href="/gobyexample/sorting">Sorting</a></li>

	<li><a href="/gobyexample/sorting-by-functions">Sorting by Functions</a></li>

	<li><a href="/gobyexample/panic">Panic</a></li>

	<li><a href="/gobyexample/defer">Defer</a></li>

	<li><a href="/gobyexample/collection-functions">Collection Functions</a></li>

	<li><a href="/gobyexample/string-functions">String Functions</a></li>

	<li><a href="/gobyexample/string-formatting">String Formatting</a></li>

	<li><a href="/gobyexample/regular-expressions">Regular Expressions</a></li>

	<li><a href="/gobyexample/json">JSON</a></li>

	<li><a href="/gobyexample/time">Time</a></li>

	<li><a href="/gobyexample/epoch">Epoch</a></li>

	<li><a href="/gobyexample/time-formatting-parsing">Time Formatting / Parsing</a></li>

	<li><a href="/gobyexample/random-numbers">Random Numbers</a></li>

	<li><a href="/gobyexample/number-parsing">Number Parsing</a></li>

	<li><a href="/gobyexample/url-parsing">URL Parsing</a></li>

	<li><a href="/gobyexample/sha1-hashes">SHA1 Hashes</a></li>

	<li><a href="/gobyexample/base64-encoding">Base64 Encoding</a></li>

	<li><a href="/gobyexample/reading-files">Reading Files</a></li>

	<li><a href="/gobyexample/writing-files">Writing Files</a></li>

	<li><a href="/gobyexample/line-filters">Line Filters</a></li>

	<li><a href="/gobyexample/command-line-arguments">Command-Line Arguments</a></li>

	<li><a href="/gobyexample/command-line-flags">Command-Line Flags</a></li>

	<li><a href="/gobyexample/environment-variables">Environment Variables</a></li>

	<li><a href="/gobyexample/spawning-processes">Spawning Processes</a></li>

	<li><a href="/gobyexample/execing-processes">Exec'ing Processes</a></li>

	<li><a href="/gobyexample/signals">Signals</a></li>

	<li><a href="/gobyexample/exit">Exit</a></li>

</ul>
<p class="footer">
	by <a href="/gobyexample/https://twitter.com/mmcgrana">@mmcgrana</a> | <a href="/gobyexample/mailto:mmcgrana@gmail.com">feedback</a> | <a href="/gobyexample/https://github.com/mmcgrana/gobyexample">source</a> | <a href="/gobyexample/https://github.com/mmcgrana/gobyexample#license">license</a>
</p>
humboldt Written by:

humboldt 的趣味程序园